﻿using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Data.Common;

namespace Inaction.Core
{
    public interface ISavable : IClonable, IDeletable
    {
        bool IsDirty { get; }
        void CancelEdit();
        void MarkNone();
        void Save();
        void Save(IDbTransaction trans);
        [EditorBrowsable(EditorBrowsableState.Never)]
        void DoSave();
        void OnSaving(IDbTransaction trans);
        void OnSaved(IDbTransaction trans);

        List<ISavable> FirstTransData { get; }
        List<ISavable> LastTransData { get; }
        void ClearTransData();
    }
}
